package com.binge.test.exec;

import com.binge.test.builder.Director;

public class CoreExec {

    public static void main(String[] args) {
        /*CarTemplate benzCar = new BenzCar();
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("start");
        arrayList.add("stop");
        arrayList.add("alarm");
        arrayList.add("engine boom");
        benzCar.setSequence(arrayList);

        benzCar.run();


        BmwCar bmwCar = new BmwCar();
        ArrayList<String> arrayList1 = new ArrayList<>();
        arrayList1.add("start");
        arrayList1.add("stop");
        arrayList1.add("alarm");
        arrayList1.add("engine boom");
        bmwCar.setSequence(arrayList1);
        bmwCar.setAlarmFlag(false);
        bmwCar.run();*/

      /*  CarBuilder benzCarBuilder = new BenzCarBuilder();
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("start");
        arrayList.add("stop");
        arrayList.add("alarm");
        arrayList.add("engine boom");
        benzCarBuilder.setSequence(arrayList);
        benzCarBuilder.getCar().run();

       CarBuilder bmwCarBuilder = new BmwCarBuilder();
        arrayList.clear();
        arrayList.add("stop");
        arrayList.add("start");
        arrayList.add("engine boom");
        arrayList.add("alarm");
        bmwCarBuilder.setSequence(arrayList);
        BmwCar bmwCar = (BmwCar) bmwCarBuilder.getCar();
        bmwCar.setAlarmFlag(false);
        bmwCar.run();*/

        Director director = new Director();
        for (int i = 0; i < 100; i++) {
            director.getABenzCar().run();
        }
        for (int i = 0; i < 100; i++) {
            director.getABmwCar().run();
        }
        for (int i = 0; i < 1000; i++) {
            director.getBBenzCar().run();
        }
        for (int i = 0; i < 10000; i++) {
            director.getBBmwCar().run();
        }
    }

}
